1. Field of the Invention
The present invention relates to methods, apparatus and computer-code for database administration.
2. Related Art
Relational databases provide an SQL interface for accessing (i.e. reading and/or writing) data stored in a data repository. Because SQL is a declarative language, there is sometimes more than one way to execute any given SQL query, each way producing identical results.
In the present disclosure, an ‘execution plan’ or a ‘query plan’ or a ‘query execution plan’ is a set of steps used to access information in a SQL relational database. Typically, each execution plan is associated with a different ‘cost’ indicative of a service time and/or amount of resources required to effect the SQL database query using the given plan. Thus, most SQL relational database include a query optimization engine or ‘query optimizer’ that, when handling an SQL query, may evaluate the cost of one or more execution plans and select the optimal execution plan.
Most modern relational databases (i.e. Oracle®, MS-SQL®, Sybase®, MySQL®, etc) provide a feature for displaying, upon request, a description (i.e. via a text interface and/or GUI) of an execution plan. In one example, an ‘EXPLAIN PLAN” statement may be submitted to the database. Information describing execution plans may be very useful for analyzing why a specific query is running slowly, and thus may be useful for ‘tuning’ or re-structuring a database (i.e re-writing queries, modifying a database schema, upgrading physical equipment used by the database, etc.) in order to improve performance. This execution plan related information may include, for example, a description of how tables are joined and in which order and/or a list of which indices that are used when seeking data and/or a list of which sort operations are carried out when executing the query, and/or other related information.
It would be highly desirable to have a tool which facilitates further exploitation of information relating to database execution plans.